require_once($_SERVER['DOCUMENT_ROOT'] . "/" . "headerCnl.php");
include_once(BASISFOLDER . "Scripts/classWebpagina.php"); // Comment out if no dynamic webpage
$dezeWebpag = new Webpagina(WEBPAD); // Comment out if no dynamic webpage - and fill the meta names yourself
$sitetaal = isset($__GET["sitetaal"]) ? htmlentities($__GET["sitetaal"]) : $dezeWebpag->taal ; // Replace if no dynamic webpage
$sitetaal = isset($sitetaal) ? $sitetaal : BROWSERTAAL;
define("TAAL", $sitetaal);
include_once(BASISFOLDER . "Scripts/classMenu.php");
$kgMenu = new Menu(WEBPAD, "P", TAAL == "nl" ? "cnl" : "ca");
$ditItem = $kgMenu->huidigItem();
$plaatsHuidigItem = $ditItem->plaats;
?>
include_once(BASISFOLDER . "header-". TAAL . ".php"); ?>
if (!empty($ditItem)) echo $ditItem->naam;else echo $dezeWebpag->titel; ?>
echo $dezeWebpag->titel; ?>
if (strpos($dezeWebpag->inhoud, STATIC_CONTENT)){
$contentWebpad = strpos($dezeWebpag->webpad, ".php") ? substr($dezeWebpag->webpad, 0, -4) : $dezeWebpag->webpad;
echo '
';
include(BASISFOLDER . $contentWebpad . "-content.php");
echo '
';
$contenttekst = NULL;
}
else
$contenttekst = explode('
', $kgMenu->webInhoud($dezeWebpag->inhoud));
?>
if (!empty($contenttekst[0]))
{
?>
echo $contenttekst[0];
?>
$plaatjerechts = empty($dezeWebpag->illustratie) ? 'assets/images/caronne-over-ons-pagina-plaatje-website.jpg' : $dezeWebpag->illustratie;
?>
}
?>
if (!empty($contenttekst[1])){
echo '
';
echo $contenttekst[1];
echo '
';
}
?>
if (!empty($contenttekst[2]))
{
?>
echo $contenttekst[2]; ?>
}
?>
// Zetten van contactbuttonwaarden
preg_match('/
\w*)\")?\s*(innerHTML=\"(?P\w*)\")?\s*(href=\"(?P\S*)\")?\s*(title=\"(?P\w*)\")?/', $dezeWebpag->inhoud, $contactbutton);
if (empty($contactbutton['innerHTML'])){
if (TAAL == "nl")
$contactbutton['innerHTML'] = "Contact";
else
$contactbutton['innerHTML'] = "Contact";
}
if (empty($contactbutton['href']))
$contactbutton['href'] = SITENAAM . "caronne/contact-" . TAAL . ".php" . CIDQ;
if (empty($contactbutton['title'])){
if (TAAL == "nl")
$contactbutton['title'] = "Gaat naar het contactformulier";
else
$contactbutton['title'] = "Links to our contact form";
}
if (!empty($contactbutton[0]))
echo "";
echo '
// Bepalen welk submenu er onder de body content moet worden getoond
$tellerMultiplier = 10; // gebruikt om de stapgrootte van de lus voor het submenu te bepalen (default: algemeen submenu)
$menuSubNaamplaats = 10000; // gebruikt om de plaats van het begin van het submenu aan te geven (default: algemeen submenu)
if ($kgMenu->item(intval($plaatsHuidigItem / 100) * 100 + 10)){ // toon menu->submenu->submenu (contextgevoelig)
$tellerMultiplier = 10;
$menuSubNaamplaats = intval($plaatsHuidigItem / 100) * 100;
}
else{
if ($kgMenu->item(intval($plaatsHuidigItem / 1000) * 1000 + 100)){ // toon menu->submenu->submenu (contextgevoelig)
$tellerMultiplier = 100;
$menuSubNaamplaats = intval($plaatsHuidigItem / 1000) * 1000;
}
else{
if ($kgMenu->item(intval($plaatsHuidigItem / 10000) * 10000 + 1000)) { // toon menu->submenu (contextgevoelig)
$tellerMultiplier = 1000;
$menuSubNaamplaats = intval($plaatsHuidigItem / 10000) * 10000;
}
}
}
if ($menuSubNaamplaats != 10000){
$item = $kgMenu->item($menuSubNaamplaats);
$menuSubTitel = $item->naam;
}
else
$menuSubTitel = TAAL == "nl" ? "Onze producten" : "Our Services";
?>
if (!strpos($ditItem->type, "n")) {?>
echo $menuSubTitel; ?>
} ?>
$teller = $menuSubNaamplaats + $tellerMultiplier;
while ($item = $kgMenu->item($teller)){
if (strpos($item->type, "r")){
$figuurMenuonder = empty($item->illustratie) ? FIGUUR_MENUONDER : $item->illustratie;
?>
echo $item->naam; ?>
echo $item->beschrijving; ?>
}
$teller += $tellerMultiplier;
}
?>